<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<mesoBoard.Data.BBCode>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <fieldset>
        <legend><%= Html.ThemeImage("pilcrow.png") %>BB Code</legend>
        
        <fieldset>
            <legend>Create BB Code</legend>
            <% using(Html.BeginForm()){ %>
                <dl class="form">
                    <dt>Tag</dt>
                    <dd>
                        <%= Html.TextBox("Tag") %>
                        <%= Html.ValidationMessage("Tag") %>
                    </dd>
                    
                    <dt>Parse</dt>
                    <dd>
                        <%= Html.TextArea("Parse", new { cols="50", rows="3", @class="normal"})%>
                        <%= Html.ValidationMessage("Parse") %>
                    </dd>
                    
                    <dt>Pattern</dt>
                    <dd>
                        <%= Html.TextArea("Pattern", new { cols="50", rows="3", @class="normal"})%>
                        <%= Html.ValidationMessage("Pattern") %>
                    </dd>
                    
                    <dt>&nbsp;</dt>
                    <dd>
                        <%= Html.SubmitButton("CreateBBCode", "Create BB Code") %>
                    </dd>
                </dl>
            <% } %>
        </fieldset>
        
        <table class="form_table"> 
        
            <tr>
                <th>Tag</th>
                <th>Parse</th>
                <th>Pattern</th>
                <th></th>
                <th></th>
            </tr>
            
            <% foreach(BBCode b in Model){ %>
                <tr>
                    <td><%= b.Tag %></td>
                    <td><%: b.Parse %></td>
                    <td><%: b.Pattern %></td>
                    <td><%= Html.ActionLink("Edit", "EditBBCode", new { BBCodeID = b.BBCodeID}) %></td>
                    <td><%= Html.AdminConfirm("Delete", Url.Action("DeleteBBCode", new { BBCodeID = b.BBCodeID}), Url.Action("BBCodes")) %></td>
                </tr>
            <%} %>
            
        </table>
        
    </fieldset>

</asp:Content>
